#include <iostream>
#include "../Sales_item.h"
using namespace std;

int main(){
    Sales_item book1,book2;
    int num = 1;
    cout << "请输入销售记录：" << endl;
    if(cin >> book1){
        while (cin >> book2){
            if(compareIsbn(book1,book2)){
                num++;
            } else{
                cout << book1.isbn() << "共有" << num << "条销售记录" << endl;
                book1 = book2;
                num = 1;
            }
        }
        cout << book1.isbn() << "共有" << num << "条销售记录" << endl;
    } else{
        cout << "输入数据有误" << endl;
        return -1;
    }

    return 0;
}